home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 019a / amac40.zip / PAGE23.QM < prev    next >
Text File  |  1991-08-04  |  16KB  |  402 lines

  1. *                              (PageMaker)  v2.3f              August 4, 1991
  2. *                            Written by Tom Hogshead
  3. *
  4. * ┌────────────────────────────────[ (INDEX) ]───────────────────────────────┐
  5. * │
  6. * │         Macro        Page Breaks         Inserts Page Numbers ?
  7. * │        ───────       ───────────         ────────────────────────────────
  8. * │        (Alt_4)       Yes                 No      )
  9. * │                                                  ) for QMAC txtfiles only
  10. * │        (Alt_5)       Removes             Removes )
  11. * │
  12. * │        (Alt_6)       Auto                No
  13. * │
  14. * │        (Alt_7)       Yes                 No
  15. * │
  16. * │        (Alt_8)        "                  Yes, query
  17. * │
  18. * │        (Alt_9)        "                  Yes, query bar
  19. * │
  20. * │        (Alt_0)       Removes             Removes
  21. * │
  22. * │  @(h)  Jump From Index Line To (Locate) Macro or Item In Document Below
  23. * │
  24. * │(Description)       - PageMaker
  25. * │(Files)             - Included
  26. * │(Change)            - Settings and Running
  27. * │(Macros)            - in PageMaker PAGE23.ZIP
  28. * │(Version)           - History
  29. * │(Other)             - Macros not included
  30. * └──────────────────────────────────────────────────────────────────────────┘
  31.  
  32. * (Description) of (PageMaker):
  33.  
  34. *       The QEdit macros in PageMaker PAGE23.ZIP paginate documents and
  35. *       QMAC txtfiles so page break locations can be seen and moved
  36. *       for better readability.
  37.  
  38. * (Files) Included in PAGE23.ZIP:
  39.  
  40. *   PAGExx.QM     this txtfile of macros
  41. *   PAGExx.MAC    macfile converted from this txtfile with QMAC
  42. *   PAGE.TST      200 line document with line numbers to set parameters
  43. *   PAGE-QM.TST   200 line document with line numbers and asterisk in column 1
  44. *   PAGE.INF      description of macros
  45.  
  46. * (Change) Settings and Running:
  47.  
  48. *       For different settings change ** below with the following
  49. *       formulae: (PL-TM-BM-1)= 53, (TM-2)= 4, .... etc where TM= 6,
  50. *       BM= 6, PL= 66 These macros paginate to 54 lines/page. Remember
  51. *       INSERT must be ON.
  52.  
  53. *       Depending on whether a document is reloaded or re paginated,
  54. *       there may be an extraneous carriage return and/or line feed
  55. *       present that cannot be removed when paginating. You may also
  56. *       see the top margin vary +- 1. Just be aware. Some printers may
  57. *       also handle documents paginated with these macros differently.
  58.  
  59. *       It is important that no lines in a document or a QMAC txtfile
  60. *       contain "page[space]-" or that and the subsequent line will be
  61. *       deleted when using some of the macros.
  62.  
  63. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  64.  
  65. * To BEGIN, just type "START PAGE" <Enter>. All pertinent files will be
  66. * loaded in the "Ring" for viewing, and PAGE23.MAC is read.
  67. * Alternatively, type "START PAGE 0" <Enter> and the disk copies of all
  68. * files in the "Ring" will be loaded ready for editing, saving time.
  69.  
  70. * (Macros)
  71. * ---------
  72. * 
  73. *┌─────────────────────────────────────────────────────────────────────────┐
  74. *│(Alt_4) AUTOMATIC Page Breaks Only, NO Page #'s , for QMAC txtfiles only │
  75. *└─────────────────────────────────────────────────────────────────────────┘
  76. * Be careful not to place page breaks within a macro. QMAC sometimes gets
  77. * confused when page break lines are within macros, especially with labels.
  78. * Place page breaks only between macros.
  79.  
  80. @4 macrobegin
  81.         setprintpagesize  "0" return            * cut off QEdit pagination
  82.  LABEL1:                                        *  & top/bottom margins
  83.  find #12 #27 return "n" return
  84.  jfalse LABEL2:
  85.         delline                                 * delline if FF Esc found
  86.  jump LABEL1:
  87.  LABEL2:
  88.         begfile find #10 return "n" return
  89.  jfalse LABEL3:
  90.         delline                                 * delline if LF found
  91.  jump LABEL2:
  92.  LABEL3:
  93.         begfile
  94.         #10 repeatcmd "3" return                * insert 4 LF's on top
  95.         splitline cursordown                                ** set "3"=(TM-3) **
  96.         begline
  97.  LABEL4:
  98.         cursordown
  99.         repeatcmd "52" return                        ** set "52"=(PL-TM-BM-2) **
  100.  jfalse LABEL5:
  101.               "Cursor  only to between macros, ENTER to set"
  102.                return
  103.                cursorup markline markline
  104.                pause deleteblock begline
  105.         #42 #12 #27 repeatcmd "71" return       * insert asterisk FF 72 Esc's
  106.         #10 repeatcmd "4" return                            ** set "4"=(TM-2) **
  107.         return
  108.  jump LABEL4:                            
  109.  LABEL5:
  110.         endfile
  111.         return
  112.         #42 #12 #27 repeatcmd "77" return
  113.         begfile
  114. *
  115. * 193 bytes Sat  07-28-1990  15:20:09
  116.  
  117. * 
  118. *┌─────────────────────────────────────────────────────────┐
  119. *│(Alt_5) Removes Pagination Only, for QMAC txtfiles only  │
  120. *└─────────────────────────────────────────────────────────┘
  121. @5 macrobegin
  122.  LABEL1:
  123.         begfile find #12 #27 return "n" return
  124.  jfalse LABEL2:
  125.         delline                                 * delline if FF Esc found
  126.  jump LABEL1:
  127.  LABEL2:
  128.         begfile find #10 return "n" return
  129.  jfalse LABEL3:
  130.         delline                                 * delline if LF found
  131.  jump LABEL2:
  132.  LABEL3:
  133.         begfile
  134. *
  135. * 37 bytes Sat  07-28-1990  15:20:29
  136.  
  137. * 
  138. *┌──────────────────────────────────────────────────┐
  139. *│(Alt_6) AUTOMATIC Page Breaks Only, NO Page #'s   │
  140. *└──────────────────────────────────────────────────┘
  141. @6     macrobegin setprintpagesize  "0" return
  142.  lab1: begfile find #12 #27  return "n" return
  143.        jfalse lab2: delline             jump lab1:
  144.  lab2: begfile find #10      return "n" return
  145.        jfalse lab3: delline             jump lab2:
  146.  lab3: begfile find #12      return "n" return
  147.        jfalse lab4: delch               jump lab3:
  148.  lab4: begfile find "page " "-" return "n" return
  149.        jfalse lab5: delline delline     jump lab4:
  150.  lab5: begfile
  151.        #10 repeatcmd "4" return splitline cursordown        ** set "4"=(TM-2) **
  152.  lab6: begline cursordown repeatcmd "53" return      ** set "53"=(PL-TM-BM-1) **
  153.        jfalse lab7: begline #12 #27 repeatcmd "72" return
  154.        #10 repeatcmd "5" return return jump lab6:           ** set "5"=(TM-1) **
  155.  lab7: endfile return begline #12 #27 repeatcmd "78" return begfile
  156. * 136 bytes Sat  07-28-1990  15:20:38
  157.  
  158.  
  159. * 
  160. * ----------------------------------------------------------------------
  161. * @(7) Add Page Breaks To Document Without Page Numbers And      (Alt_7)
  162. *      Remove Previous Pagination Before Pagination
  163. *      66 Lines/Page, Top And Bottom Margins 6
  164. * ----------------------------------------------------------------------
  165.  
  166. *      This macro adds page breaks and top and bottom margins to
  167. *      documents by inserting ASCII formfeed character #10 and linefeed
  168. *      character #12.  Escape character #27 is used to make page break
  169. *      locations more visible.  The macro is written to print 54
  170. *      lines/page with a top and bottom margin of 6.  The user may
  171. *      change these settings by changing '**' below using the following
  172. *      formulae and recompiling with QMAC:
  173.  
  174. *                (PL - TM - BM -1) = 53
  175. *                (TM - 2)          =  4
  176. *                (TM - 1)          =  5
  177.  
  178. *      where                    TM =  6
  179. *                               BM =  6
  180. *                               PL = 66
  181.  
  182. *      To run, press @7 with the cursor positioned anywhere in the
  183. *      document.  At each prompt, move the cursor up only to select the
  184. *      preferred location for each page break, and press <enter>.
  185. *      Insert must be ON.
  186.  
  187. @7     macrobegin
  188.        setprintpagesize "0" return
  189.  lab1: begfile
  190.        find #12 #27 return "n" return
  191.        jfalse lab2:
  192.        delline
  193.        jump lab1:
  194.  lab2: begfile
  195.        find #10 return "n" return
  196.        jfalse lab3:
  197.        delline
  198.        jump lab2:
  199.  lab3: begfile
  200.        find #12 return "n" return
  201.        jfalse lab4: delch
  202.        jump lab3:
  203.  lab4: begfile
  204.        find "page " "-" return "n" return
  205.        jfalse lab5:
  206.        delline delline
  207.        jump lab4:
  208.  lab5: begfile
  209.        #10 repeatcmd "4" return                     ** set "4"=(TM-2)
  210.        splitline cursordown
  211.  lab6: begline
  212.        cursordown repeatcmd "53" return             ** set "53"=(PL-TM-BM-1)
  213.        jfalse lab7:
  214.        "UP arrow key only, ENTER to set" return
  215.        cursorup markline markline
  216.        pause
  217.        deleteblock
  218.        begline
  219.        #12 #27 repeatcmd "72" return
  220.        #10 repeatcmd "5" return                     ** set "5"=(TM-1)
  221.        return
  222.        jump lab6:
  223.  lab7: endfile
  224.        return
  225.        begline
  226.        #12 #27 repeatcmd "78" return
  227.        begfile
  228. *
  229. * 204 bytes Sat  07-28-1990  15:20:55 (TH @7)
  230. * 204 bytes Sun  08-04-1991  12:15:44 (TH @7)
  231.  
  232. * 
  233. *┌────────────────────────────────────────────────────┐
  234. *│(Alt_8) PAGINATE, Add Page #'s, NO Query Bar        │
  235. *└─[Add page # at prompt, then ENTER for next page]───┘
  236. *
  237. @8     macrobegin setprintpagesize  "0" return
  238.  lab1: begfile find #12 #27  return "n" return
  239.        jfalse lab2: delline             jump lab1:
  240.  lab2: begfile find #10      return "n" return
  241.        jfalse lab3: delline             jump lab2:
  242.  lab3: begfile find #12      return "n" return
  243.        jfalse lab4: delch               jump lab3:
  244.  lab4: begfile find "page " "-" return "n" return
  245.        jfalse lab5: delline delline     jump lab4:
  246.  lab5: begfile
  247.        #10 repeatcmd "4" return splitline cursordown        ** set "4"=(TM-2) **
  248.  lab6: begline cursordown repeatcmd "53" return      ** set "53"=(PL-TM-BM-1) **
  249.        jfalse lab7: "UP arrow key only, ENTER to set" return cursorup
  250.        markline markline pause deleteblock begline #12 #27 repeatcmd
  251.       "72" return #10 repeatcmd "5" return  return          ** set "5"=(TM-1) **
  252.       "page " "--" return return cursorup cursorup centerline jump lab6:
  253.  lab7: endfile return begline #12 #27 repeatcmd "78" return begfile
  254.  lab8: find "page " "-" return "n"  return
  255.        jfalse lab9: makectrofscreen cursorright repeatcmd "5" return
  256.        pause jump lab8:
  257.  lab9: begfile
  258. *
  259. * 254 bytes Sat  07-28-1990  15:21:11
  260.  
  261. * 
  262. *┌──────────────────────────────────────────────────┐
  263. *│(Alt_9) PAGINATE, Add Page #'s With Query Bar     │
  264. *└─[Add page # at prompt, then ENTER for next page]─┘
  265. *
  266. @9     macrobegin setprintpagesize  "0" return
  267.  lab1: begfile find #12 #27  return "n" return
  268.        jfalse lab2: delline             jump lab1:
  269.  lab2: begfile find #10      return "n" return
  270.        jfalse lab3: delline             jump lab2:
  271.  lab3: begfile find #12      return "n" return
  272.        jfalse lab4: delch               jump lab3:
  273.  lab4: begfile find "page " "-" return "n" return
  274.        jfalse lab5: delline delline     jump lab4:
  275.  lab5: begfile
  276.        #10 repeatcmd "4" return splitline cursordown        ** set "4"=(TM-2) **
  277.  lab6: begline cursordown repeatcmd "53" return      ** set "53"=(PL-TM-BM-1) **
  278.        jfalse lab7: "UP arrow key only, ENTER to set" return cursorup
  279.        markline markline pause deleteblock begline #12 #27 repeatcmd
  280.        "72" return #10 repeatcmd "5" return  return         ** set "5"=(TM-1) **
  281.        "page " "--" return return cursorup cursorup centerline jump lab6:
  282.  lab7: endfile return begline #12 #27 repeatcmd "78" return begfile
  283.  lab8: find "page " "-" return "n"  return
  284.        jfalse lab9: makectrofscreen begline "Enter page # (start p2) "
  285.        " " repeatcmd "17" return #25 #25 return cursorup begline
  286.        markblockbegin endline markblockend cursordown begline
  287.        wordright cursorright repeatcmd "5" return pause
  288.        cursorup delline cursordown jump lab8:
  289.  lab9: begfile
  290. *
  291. * 327 bytes Sat  07-28-1990  15:21:27
  292.  
  293.  
  294. * 
  295. * ----------------------------------------------------------------------
  296. * @0   Removes Pagination                            (Alt_0)
  297. * ----------------------------------------------------------------------
  298.  
  299. *      This macro removes page breaks, top and bottom margins, and line
  300. *      numbers from a document paginated with any of the macros in
  301. *      PAGExx.QM.  To run, press @0 with the cursor positioned anywhere
  302. *      in the document.  The cursor returns to the file beginning after
  303. *      completion.
  304.  
  305. @0     macrobegin
  306.  lab1: begfile
  307.        find #12 #27 return "n" return
  308.        jfalse lab2:
  309.        delline
  310.        jump lab1:
  311.  lab2: begfile
  312.        find #10 return "n" return
  313.        jfalse lab3:
  314.        delline
  315.        jump lab2:
  316.  lab3: begfile
  317.        find #12 return "n" return
  318.        jfalse lab4: delch
  319.        jump lab3:
  320.  lab4: begfile
  321.        find "page " "-" return "n" return
  322.        jfalse lab5:
  323.        delline delline
  324.        jump lab4:
  325.  lab5: begfile
  326. *
  327. * 78 bytes Sat  07-28-1990  15:21:44 (TH @0)
  328. * 78 bytes Sun  08-04-1991  12:15:29 (TH @0)
  329.  
  330. * 
  331. * ----------------------------------------------------------------------
  332. * @(h)  Jump From Index Line To (Locate) Macro or Item In Document Below
  333. * ----------------------------------------------------------------------
  334.  
  335. *        Alt_h can be used to quickly jump from Index Line to the desired
  336. *        item or macro in the document below:
  337.  
  338. *        1. Press Alt and h at the same time. Line 1 is marked to
  339. *           highlight. Cursor down to desired line in Index.
  340.  
  341. *        2. Press Enter. The macro then locates and jumps to the item
  342. *           selected on the cursor line in the document below.
  343.  
  344. *   See BOOKxx.Qm and JMPPOSxx.QM in AMACxx.ZIP for more discussion about
  345. *   using bookmarks and positions markers ( ) to jump to positions in
  346. *   files.
  347.  
  348. @h macrobegin
  349.         unmarkblock                     * Unmark any marked blocks
  350.         defaultwordset                  * In case altwordset on
  351.         begfile                         * Go to file begin
  352.         markline markline               * And highlight line 1
  353.         pause                           * Pause for Index selection
  354.         wordright markword              * Mark first word on line
  355.         copy                            * Copy word to scrap
  356.         endpara                         * Go to end of Index
  357.         makectrofscreen                 * Cursor line center of window
  358.         find "(" paste ")"
  359.         return "I" return               * Find first marked word in doc
  360.         jfalse NOMARK:
  361.         begline                         * If mark found, go to begline
  362.         jump END:
  363.         NOMARK:
  364.         begfile                         * if no mark found, go to begfile
  365.     END:
  366. *
  367. * 33 bytes Wed  07-10-1991  10:11:24 (TH @1 in BOOKxx.QM)
  368.  
  369.  
  370.  
  371. * (Other) Macros: See ALLMACRO.INF
  372. *
  373.  
  374. * (Index) is at top of file
  375. *
  376. * (Version) History:
  377. *
  378. *   v1.1-8 misc changes, NO page #'s
  379. *   v1.9 - added page #'s, NO  page # query bar
  380. *   v2.0 - added page #'s with page # query bar
  381. *   v2.1 - summary of latest macros
  382. *   v2.2 - added Alt_4 & 5 to paginate QMAC txtfiles only
  383. *        - added Alt_1 from BookMarker Macros BOOK12.ZIP
  384. *   v2.2a- modified Alt_4 to not place asterisk in column 1 at begfile
  385. *   v2.2b- corrected Alt_4, label2: was on wrong line
  386. *   v2.3 - wrong version of PAGE.TST was in v2.2b, corrected
  387. *        - modified Alt_8,9 & 0 so no lines contain "page[space]-" and
  388. *          therefore necessary lines will not be deleted when paginating
  389. *        - changed Alt_1 to Ctl_1
  390. *   2.3a - Changed other file names in series, this is an update.
  391. *   2.3b - Changed documentation.
  392. *   2.3c - PAGE23.MAC was wrong file. Corrected.
  393. *   2.3d - Modified documentation and added START.BAT.
  394. *   2.3e - Minor documentation changes.
  395. *        - Changed ^1 key to @h.
  396. *   2.3f - Changed @7 and @0 documentation.
  397. *
  398. *
  399. *
  400. *
  401. *
  402.